package com.wbt.mybatisplus.service.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.wbt.mybatisplus.mapper.UserMapper;
import com.wbt.mybatisplus.pojo.PageVo;
import com.wbt.mybatisplus.pojo.User;
import com.wbt.mybatisplus.service.UserService;
import org.springframework.stereotype.Service;

@Service
public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements UserService {
    @Override
    public Page<User> findPage(PageVo pageVo) {
        Page<User> page = new Page<>(pageVo.getPageNum(),pageVo.getPageSize());

        return this.getBaseMapper().findPage(page,pageVo.getQuery().getAge());
    }
}
